

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>roster_user_tools.data_flags &mdash; Roster User Tools v0.17 documentation</title>
    
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     'v0.17',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="top" title="Roster User Tools v0.17 documentation" href="../../index.html" />
    <link rel="up" title="Module code" href="../index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../../index.html">Roster User Tools v0.17 documentation</a> &raquo;</li>
          <li><a href="../index.html" accesskey="U">Module code</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <h1>Source code for roster_user_tools.data_flags</h1><div class="highlight"><pre>
<span class="c">#!/usr/bin/python</span>

<span class="c"># Copyright (c) 2009, Purdue University</span>
<span class="c"># All rights reserved.</span>
<span class="c">#</span>
<span class="c"># Redistribution and use in source and binary forms, with or without</span>
<span class="c"># modification, are permitted provided that the following conditions are met:</span>
<span class="c">#</span>
<span class="c"># Redistributions of source code must retain the above copyright notice, this</span>
<span class="c"># list of conditions and the following disclaimer.</span>
<span class="c">#</span>
<span class="c"># Redistributions in binary form must reproduce the above copyright notice, this</span>
<span class="c"># list of conditions and the following disclaimer in the documentation and/or</span>
<span class="c"># other materials provided with the distribution.</span>
<span class="c">#</span>
<span class="c"># Neither the name of the Purdue University nor the names of its contributors</span>
<span class="c"># may be used to endorse or promote products derived from this software without</span>
<span class="c"># specific prior written permission.</span>
<span class="c">#</span>
<span class="c"># THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span>
<span class="c"># AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
<span class="c"># IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span>
<span class="c"># DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE</span>
<span class="c"># FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span>
<span class="c"># DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR</span>
<span class="c"># SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span>
<span class="c"># CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</span>
<span class="c"># OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span>
<span class="c"># OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>

<span class="sd">&quot;&quot;&quot;Data flags lib, flags for each group of tools.&quot;&quot;&quot;</span>

<span class="n">__copyright__</span> <span class="o">=</span> <span class="s">&#39;Copyright (C) 2009, Purdue University&#39;</span>
<span class="n">__license__</span> <span class="o">=</span> <span class="s">&#39;BSD&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s">&#39;#TRUNK#&#39;</span>


<span class="n">DEFAULT_TTL</span> <span class="o">=</span> <span class="mi">3600</span>


<span class="kn">import</span> <span class="nn">core_flags</span>

<div class="viewcode-block" id="Acl"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Acl">[docs]</a><span class="k">class</span> <span class="nc">Acl</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line acl flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="Acl.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Acl.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s">&#39;Acl&#39;</span>
    <span class="n">not_list</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">!=</span> <span class="s">&#39;List&#39;</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-a&#39;</span><span class="p">,</span> <span class="s">&#39;--acl&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;acl&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of access control list name.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;acl&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--cidr-block&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of CIDR block or single IP address.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span><span class="o">==</span><span class="s">&#39;Make&#39;</span><span class="p">)</span>
    <span class="k">if</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">==</span> <span class="s">&#39;Remove&#39;</span> <span class="p">):</span>
      <span class="c"># Not required since tool handles the error</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;force&#39;</span><span class="p">,</span> <span class="s">&#39;cidr_block&#39;</span><span class="p">),</span> <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;independent_args&#39;</span><span class="p">,</span>
                       <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

</div></div>
<div class="viewcode-block" id="Record"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Record">[docs]</a><span class="k">class</span> <span class="nc">Record</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line record flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="Record.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Record.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s">&#39;Record&#39;</span>
    <span class="n">not_list</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">!=</span> <span class="s">&#39;List&#39;</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span>
        <span class="s">&#39;--assignment-ip&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;assignment_ip&#39;</span><span class="p">,</span>
        <span class="n">help</span><span class="o">=</span><span class="s">&#39;(A, AAAA) String of the IP address&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;assignment-ip&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;assignment_ip&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;a&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;assignment_ip&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;aaaa&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--hardware&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;hardware&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;hardware&gt;&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(HINFO) String of the hardware type.&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;hardware&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;hinfo&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--os&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;os&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(HINFO) String of the OS type.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;os&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;os&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;hinfo&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--quoted-text&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;quoted_text&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;quoted-text&gt;&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(TXT) String of quoted text.&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;quoted_text&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;txt&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--assignment-host&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;assignment_host&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;hostname&gt;&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(CNAME, PTR, SRV) String of the hostname.&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;assignment_host&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;cname&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;assignment_host&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;ptr&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;assignment_host&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;srv&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--name-server&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;name_server&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SOA,NS) String of the hostname of the name &#39;</span>
                                <span class="s">&#39;server.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;name-server&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;name_server&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;soa&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;name_server&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;ns&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--admin-email&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;admin_email&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SOA) String of the admin email address.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;admin-email&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;admin_email&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;soa&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--serial-number&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;serial_number&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;int&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SOA) Integer of the serial number.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;serial-number&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;serial_number&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;soa&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--refresh-seconds&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;refresh_seconds&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;int&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SOA) Integer of number of seconds to &#39;</span>
                                <span class="s">&#39;refresh.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;refresh-seconds&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;refresh_seconds&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;soa&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--retry-seconds&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;retry_seconds&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;int&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SOA) Integer of number of seconds to retry.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;retry-seconds&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;retry_seconds&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;soa&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--expiry-seconds&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;expiry_seconds&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;int&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SOA) Integer of number of seconds to expire.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;expiry-seconds&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;expiry_seconds&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;soa&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--minimum-seconds&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;minimum_seconds&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;int&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SOA) Integer of minium number of seconds &#39;</span>
                                <span class="s">&#39;to refresh.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;minumum-seconds&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;minimum_seconds&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;soa&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--priority&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;priority&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SRV, MX) Integer of priority between &#39;</span>
                                <span class="s">&#39;0-65535.&#39;</span><span class="p">,</span>
                           <span class="nb">type</span><span class="o">=</span><span class="s">&#39;int&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;priority&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;priority&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;srv&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;priority&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;mx&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--weight&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;weight&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SRV) Integer of weight between 0-65535.&#39;</span><span class="p">,</span>
                           <span class="nb">type</span><span class="o">=</span><span class="s">&#39;int&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;weight&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;weight&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;srv&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--port&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;port&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(SRV) Integer of port number.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;port&gt;&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;int&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;port&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;srv&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--mail-server&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;mail_server&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;(MX) String of mail server hostname.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;hostname&gt;&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;mail_server&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;mx&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-z&#39;</span><span class="p">,</span> <span class="s">&#39;--zone-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;String of the &lt;zone-name&gt;. Example: &#39;</span>
                                 <span class="s">&#39;&quot;sub.university.edu&quot;&#39;</span><span class="p">),</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;zone-name&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-t&#39;</span><span class="p">,</span> <span class="s">&#39;--target&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;target&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of the target. &quot;A&quot; record example: &#39;</span>
                                <span class="s">&#39;&quot;machine-01&quot;, &quot;PTR&quot; record example: &#39;</span>
                                <span class="s">&#39;192.168.1.1&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;target&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;target&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--ttl&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;ttl&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Time for host to be cached before being &#39;</span>
                                <span class="s">&#39;refreshed.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;ttl&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="n">DEFAULT_TTL</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;ttl&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="n">default_view</span> <span class="o">=</span> <span class="bp">None</span>
    <span class="k">if</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">==</span> <span class="s">&#39;Make&#39;</span> <span class="p">):</span>
      <span class="n">default_view</span> <span class="o">=</span> <span class="s">u&#39;any&#39;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="s">&#39;--view-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of view name.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;view-name&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="n">default_view</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">==</span> <span class="s">&#39;Remove&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">==</span> <span class="s">&#39;Make&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;soa&#39;</span><span class="p">)</span>
</div></div>
<div class="viewcode-block" id="FormattedRecords"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.FormattedRecords">[docs]</a><span class="k">class</span> <span class="nc">FormattedRecords</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line formattedrecords flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="FormattedRecords.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.FormattedRecords.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="n">default_view</span> <span class="o">=</span> <span class="bp">None</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="s">&#39;--view-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of view name.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="n">default_view</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-f&#39;</span><span class="p">,</span> <span class="s">&#39;--records-file&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;records_file&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Records file location.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="n">default_view</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;records_file&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-z&#39;</span><span class="p">,</span> <span class="s">&#39;--zone-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of zone name.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
</div></div>
<div class="viewcode-block" id="Zone"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Zone">[docs]</a><span class="k">class</span> <span class="nc">Zone</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line zone flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="Zone.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Zone.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="n">make</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">==</span> <span class="s">&#39;Make&#39;</span>
    <span class="c"># All flags</span>
    <span class="n">default_view</span> <span class="o">=</span> <span class="bp">None</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="s">&#39;--view-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of view name.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="n">default_view</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;forward&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">make</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;reverse&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">make</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-z&#39;</span><span class="p">,</span> <span class="s">&#39;--zone-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of zone name.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;forward&#39;</span><span class="p">,</span>
                     <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span><span class="o">!=</span><span class="s">&#39;List&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;reverse&#39;</span><span class="p">,</span>
                     <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span><span class="o">!=</span><span class="s">&#39;List&#39;</span><span class="p">)</span>

    <span class="c"># Just Remove</span>
    <span class="k">if</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">==</span> <span class="s">&#39;Remove&#39;</span> <span class="p">):</span>
      <span class="c"># Not required since tool handles the error</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;force&#39;</span><span class="p">,</span> <span class="s">&#39;view_name&#39;</span><span class="p">),</span> <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;independent_args&#39;</span><span class="p">,</span>
                       <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

    <span class="c"># List and Make</span>
    <span class="k">if</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">!=</span> <span class="s">&#39;Remove&#39;</span> <span class="p">):</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-o&#39;</span><span class="p">,</span> <span class="s">&#39;--options&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;options&#39;</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of extra zone/view options, &#39;</span>
                                  <span class="s">&#39;standard bind view clause syntax.&#39;</span><span class="p">,</span>
                             <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;view-options&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;options&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;forward&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;options&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;reverse&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--origin&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;origin&#39;</span><span class="p">,</span>
                              <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of zone origin.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;origin&gt;&#39;</span><span class="p">,</span>
                              <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;origin&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">make</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;forward&#39;</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-t&#39;</span><span class="p">,</span> <span class="s">&#39;--type&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;type&#39;</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of zone type. &#39;</span>
                             <span class="s">&#39;(master, slave, forward)&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;type&gt;&#39;</span><span class="p">,</span>
                             <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;type&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">make</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;forward&#39;</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;type&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">make</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;reverse&#39;</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--cidr-block&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of CIDR block for reverse zones.&#39;</span><span class="p">,</span>
                             <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;cidr-block&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
      <span class="c"># Not required since tool handles the error</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span> <span class="s">&#39;origin&#39;</span><span class="p">),</span> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span><span class="o">!=</span><span class="s">&#39;List&#39;</span><span class="p">,</span>
                       <span class="n">command</span><span class="o">=</span><span class="s">&#39;reverse&#39;</span><span class="p">,</span> <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;independent_args&#39;</span><span class="p">)</span>

    <span class="c"># Just Make</span>
    <span class="k">if</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">==</span> <span class="s">&#39;Make&#39;</span> <span class="p">):</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--dont-make-any&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_false&#39;</span><span class="p">,</span>
                             <span class="n">dest</span><span class="o">=</span><span class="s">&#39;dont_make_any&#39;</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Make a zone in a view other than any, must &#39;</span>
                                  <span class="s">&#39;specify view name.&#39;</span><span class="p">,</span>
                             <span class="n">default</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;dont_make_any&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

</div></div>
<div class="viewcode-block" id="View"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.View">[docs]</a><span class="k">class</span> <span class="nc">View</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line view flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="View.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.View.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="n">not_list</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">!=</span> <span class="s">&#39;List&#39;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="s">&#39;--view-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of view.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-V&#39;</span><span class="p">,</span> <span class="s">&#39;--view-dep&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;view_subset&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of view dependency.&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;view_subset&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;view_subset&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-o&#39;</span><span class="p">,</span> <span class="s">&#39;--options&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;options&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;View options.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;options&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;options&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;view&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-e&#39;</span><span class="p">,</span> <span class="s">&#39;--dns-server-set&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of dns server set name.&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span>
                     <span class="n">command</span><span class="o">=</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-a&#39;</span><span class="p">,</span> <span class="s">&#39;--acl&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;acl&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of access control list name.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--allow&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;allow&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Allow ACL in view.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--deny&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;deny&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Deny ACL in view.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;allow&#39;</span><span class="p">,</span> <span class="s">&#39;deny&#39;</span><span class="p">),</span> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span><span class="o">==</span><span class="s">&#39;Make&#39;</span><span class="p">,</span>
                     <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;independent_args&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;view&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;allow&#39;</span><span class="p">,</span> <span class="s">&#39;deny&#39;</span><span class="p">),</span> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span><span class="o">==</span><span class="s">&#39;Make&#39;</span><span class="p">,</span>
                     <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;independent_args&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;acl&#39;</span><span class="p">)</span>
    <span class="k">if</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">!=</span> <span class="s">&#39;Remove&#39;</span> <span class="p">):</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;acl&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;view&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;acl&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;acl&#39;</span><span class="p">)</span>

</div></div>
<div class="viewcode-block" id="Host"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Host">[docs]</a><span class="k">class</span> <span class="nc">Host</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line view flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="Host.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Host.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="n">not_list</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">!=</span> <span class="s">&#39;List&#39;</span>
    <span class="k">if</span><span class="p">(</span> <span class="n">not_list</span> <span class="p">):</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-i&#39;</span><span class="p">,</span> <span class="s">&#39;--ip-address&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                             <span class="n">dest</span><span class="o">=</span><span class="s">&#39;ip_address&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Full IP address of machine.&#39;</span><span class="p">,</span>
                             <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;ip-address&gt;&#39;</span><span class="p">)</span>
      <span class="k">if</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">==</span> <span class="s">&#39;Make&#39;</span> <span class="p">):</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;ip_address&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;add&#39;</span><span class="p">)</span>
      <span class="k">else</span><span class="p">:</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;ip_address&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-t&#39;</span><span class="p">,</span> <span class="s">&#39;--target&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;target&#39;</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of machine host name. (Not FQDN)&#39;</span><span class="p">,</span>
                             <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;target&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;target&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--ttl&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;ttl&#39;</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Time for host to live before being &#39;</span>
                             <span class="s">&#39;refreshed.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;ttl&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="n">DEFAULT_TTL</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;ttl&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--cidr-block&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Get target ip address from cidr block &#39;</span>
                                <span class="s">&#39;automatically.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;cidr-block&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="k">if</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">==</span> <span class="s">&#39;Make&#39;</span> <span class="p">):</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;findfirst&#39;</span><span class="p">)</span>
    <span class="k">elif</span><span class="p">(</span> <span class="ow">not</span> <span class="n">not_list</span> <span class="p">):</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;cidr&#39;</span><span class="p">)</span>
    <span class="k">else</span><span class="p">:</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-z&#39;</span><span class="p">,</span> <span class="s">&#39;--zone-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of the zone name.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;zone-name&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="k">if</span><span class="p">(</span> <span class="n">not_list</span> <span class="p">):</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
    <span class="k">else</span><span class="p">:</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;zone&#39;</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;cidr&#39;</span><span class="p">)</span>

    <span class="k">if</span><span class="p">(</span> <span class="n">not_list</span> <span class="p">):</span>
      <span class="n">default_view</span> <span class="o">=</span> <span class="s">u&#39;any&#39;</span>
    <span class="k">else</span><span class="p">:</span>
      <span class="n">default_view</span> <span class="o">=</span> <span class="bp">None</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="s">&#39;--view-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;String of the view name &lt;view-name&gt;. &#39;</span>
                                 <span class="s">&#39;Example: &quot;internal&quot;&#39;</span><span class="p">),</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;view-name&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="n">default_view</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

</div></div>
<div class="viewcode-block" id="DnsServer"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.DnsServer">[docs]</a><span class="k">class</span> <span class="nc">DnsServer</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line dns_server flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="DnsServer.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.DnsServer.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="n">not_list</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">!=</span> <span class="s">&#39;List&#39;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-d&#39;</span><span class="p">,</span> <span class="s">&#39;--dns-server&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;dns_server&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;DNS server.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;dns_server&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;assignment&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-e&#39;</span><span class="p">,</span> <span class="s">&#39;--dns-server-set&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;DNS server set.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span>
                     <span class="n">command</span><span class="o">=</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;assignment&#39;</span><span class="p">)</span>
</div></div>
<div class="viewcode-block" id="Group"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Group">[docs]</a><span class="k">class</span> <span class="nc">Group</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line group flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="Group.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Group.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="n">not_list</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">!=</span> <span class="s">&#39;List&#39;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-g&#39;</span><span class="p">,</span> <span class="s">&#39;--group&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;group&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of the group name to create or assign.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;group&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;group&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;group&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;group&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;assignment&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;group&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;forward&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;group&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;reverse&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-z&#39;</span><span class="p">,</span> <span class="s">&#39;--zone-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of the zone name (optional)&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;zone&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;forward&#39;</span><span class="p">)</span>
    <span class="n">spouse_classes</span> <span class="o">=</span> <span class="p">[</span><span class="n">base</span><span class="o">.</span><span class="n">__name__</span> <span class="k">for</span> <span class="n">base</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__class__</span><span class="o">.</span><span class="n">__bases__</span><span class="p">]</span>
    <span class="k">if</span><span class="p">(</span> <span class="s">&#39;Remove&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">spouse_classes</span> <span class="p">):</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--group-permission&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                             <span class="n">dest</span><span class="o">=</span><span class="s">&#39;group_permission&#39;</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of comma-separated group permissions, &#39;</span>
                                  <span class="s">&#39;e.g., a,aaaa,cname&#39;</span><span class="p">,</span>
                             <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;group-permission&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;group_permission&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;forward&#39;</span><span class="p">)</span>
      <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;group_permission&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;reverse&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-b&#39;</span><span class="p">,</span> <span class="s">&#39;--cidr-block&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of CIDR block.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;cidr-block&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;cidr_block&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;reverse&#39;</span><span class="p">)</span>
</div></div>
<div class="viewcode-block" id="User"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.User">[docs]</a><span class="k">class</span> <span class="nc">User</span><span class="p">(</span><span class="n">Group</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line user flags</span>
<span class="sd">    The User class inherits all of Group&#39;s flags so dnsupusergroup has the </span>
<span class="sd">    option of not including flags it doesn&#39;t need. So know that if you call</span>
<span class="sd">    User.SetDataFlags(), you&#39;ll get both Users&#39; and Group&#39;s</span>

<span class="sd">  Used by:</span>
<span class="sd">    dnsupusergroup</span>
<span class="sd">  &quot;&quot;&quot;</span>
<div class="viewcode-block" id="User.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.User.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="n">not_list</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">!=</span> <span class="s">&#39;List&#39;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-n&#39;</span><span class="p">,</span> <span class="s">&#39;--new-user&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;new_user&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of the new user to create.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;new-user&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;new_user&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;user&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;new_user&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="n">not_list</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;assignment&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-a&#39;</span><span class="p">,</span> <span class="s">&#39;--access-level&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;access_level&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Access level of new user.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;access-level&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;access_level&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span><span class="o">==</span><span class="s">&#39;Make&#39;</span><span class="p">,</span>
                     <span class="n">command</span><span class="o">=</span><span class="s">&#39;user&#39;</span><span class="p">)</span>
    <span class="nb">super</span><span class="p">(</span><span class="n">User</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">SetDataFlags</span><span class="p">()</span>
</div></div>
<div class="viewcode-block" id="Hosts"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Hosts">[docs]</a><span class="k">class</span> <span class="nc">Hosts</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line uphost flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="Hosts.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Hosts.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--commit&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;commit&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Commits changes of hosts file without &#39;</span>
                                <span class="s">&#39;confirmation.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--no-commit&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;no_commit&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Suppresses changes of hosts file.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;no_commit&#39;</span><span class="p">,</span> <span class="s">&#39;commit&#39;</span><span class="p">),</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;update&#39;</span><span class="p">,</span>
                     <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;independent_args&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;no_commit&#39;</span><span class="p">,</span> <span class="s">&#39;commit&#39;</span><span class="p">),</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;edit&#39;</span><span class="p">,</span>
                     <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;independent_args&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-r&#39;</span><span class="p">,</span> <span class="s">&#39;--range&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;range&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;CIDR block range of IP addresses. Assumes -l, &#39;</span>
                                <span class="s">&#39;will only print a list of ip addresses. &#39;</span>
                                <span class="s">&#39;Example: 10.10.0.0/24&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;range&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;range&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;dump&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;range&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;edit&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--ttl&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;ttl&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Time to live.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;ttl&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="mi">3600</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;ttl&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;update&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-z&#39;</span><span class="p">,</span> <span class="s">&#39;--zone-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of the zone name.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;zone-name&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="s">&#39;--view-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;String of the view name &lt;view-name&gt;. Example: &#39;</span>
                                 <span class="s">&#39;&quot;internal&quot;&#39;</span><span class="p">),</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;view-name&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="s">&#39;any&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-f&#39;</span><span class="p">,</span> <span class="s">&#39;--file&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;file&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;File name of hosts file to write to database.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;file-name&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s">&#39;hosts_out&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;file&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

</div></div>
<div class="viewcode-block" id="CNAME"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.CNAME">[docs]</a><span class="k">class</span> <span class="nc">CNAME</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line CNAME flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="CNAME.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.CNAME.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--hostname&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;hostname&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of hostname&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;hostname&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;hostname&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-z&#39;</span><span class="p">,</span> <span class="s">&#39;--zone-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of the zone name.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;zone-name&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="s">&#39;--view-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;String of the view name &lt;view-name&gt;. &#39;</span>
                                 <span class="s">&#39;Example: &quot;internal&quot;&#39;</span><span class="p">),</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;view-name&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="s">&#39;any&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-r&#39;</span><span class="p">,</span> <span class="s">&#39;--recursive&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;recursive&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;Use recursion during lookup&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;recursive&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;recursive&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

</div></div>
<div class="viewcode-block" id="MassAdd"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.MassAdd">[docs]</a><span class="k">class</span> <span class="nc">MassAdd</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line uphost flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="MassAdd.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.MassAdd.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--commit&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;commit&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Commits changes of hosts file without &#39;</span>
                                <span class="s">&#39;confirmation.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--no-commit&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;no_commit&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Suppresses changes of hosts file.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;no_commit&#39;</span><span class="p">,</span> <span class="s">&#39;commit&#39;</span><span class="p">),</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
                     <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;independent_args&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-z&#39;</span><span class="p">,</span> <span class="s">&#39;--zone-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of the zone name.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;zone-name&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;zone_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="s">&#39;--view-name&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;String of the view name &lt;view-name&gt;. &#39;</span>
                                 <span class="s">&#39;Example: &#39;</span>
                                 <span class="s">&#39;&quot;internal&quot;&#39;</span><span class="p">),</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;view-name&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="s">&#39;any&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;view_name&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-f&#39;</span><span class="p">,</span> <span class="s">&#39;--file&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;file&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;File name of hosts file to write to database.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;file-name&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s">&#39;hosts_out&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;file&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>

</div></div>
<div class="viewcode-block" id="NamedGlobals"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.NamedGlobals">[docs]</a><span class="k">class</span> <span class="nc">NamedGlobals</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line named global flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="NamedGlobals.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.NamedGlobals.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-d&#39;</span><span class="p">,</span> <span class="s">&#39;--dns-server-set&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of the dns server set name.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;dns-server-set&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;dump&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;update&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;list&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;revert&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;dns_server_set&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;edit&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-i&#39;</span><span class="p">,</span> <span class="s">&#39;--option-id&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;option_id&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Integer of option id.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;option-id&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;option_id&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;list&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;option_id&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;dump&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;option_id&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;revert&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;option_id&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;edit&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-t&#39;</span><span class="p">,</span> <span class="s">&#39;--timestamp&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;timestamp&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;String of timestamp in YYYY-MM-DDTHH:MM:SS &#39;</span>
                                <span class="s">&#39;format.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;timestamp&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;timestamp&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;list&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;timestamp&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;dump&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;timestamp&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;edit&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-q&#39;</span><span class="p">,</span> <span class="s">&#39;--quiet&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;quiet&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Suppress program output.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;quiet&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-f&#39;</span><span class="p">,</span> <span class="s">&#39;--file&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;file&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;File name of named header dump.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;file-name&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s">&#39;named_header&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;file&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;dump&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;file&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;update&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;file&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;edit&#39;</span><span class="p">)</span>

    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span>
        <span class="s">&#39;--no-header&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;no_header&#39;</span><span class="p">,</span>
        <span class="n">help</span><span class="o">=</span><span class="s">&#39;Do not display a header.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;no_header&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>


</div></div>
<div class="viewcode-block" id="Credential"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Credential">[docs]</a><span class="k">class</span> <span class="nc">Credential</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line credential flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="Credential.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Credential.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-U&#39;</span><span class="p">,</span> <span class="s">&#39;--user-credential&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                      <span class="n">dest</span><span class="o">=</span><span class="s">&#39;user_credential&#39;</span><span class="p">,</span>
                      <span class="n">help</span><span class="o">=</span><span class="s">&#39;Username to apply credential to.&#39;</span><span class="p">,</span>
                      <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;user-credential&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;user_credential&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;make_infinite&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;user_credential&#39;</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;remove&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;user_credential&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;list&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--no-header&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;no_header&#39;</span><span class="p">,</span>
                      <span class="n">help</span><span class="o">=</span><span class="s">&#39;Do not display a header.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;no_header&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;list&#39;</span><span class="p">)</span>
</div>
<div class="viewcode-block" id="Credential.SetActionFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Credential.SetActionFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetActionFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Method to set action variable since credential has no action class&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s">&#39;Credential&#39;</span>

</div></div>
<div class="viewcode-block" id="AuditLog"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.AuditLog">[docs]</a><span class="k">class</span> <span class="nc">AuditLog</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line audit log flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="AuditLog.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.AuditLog.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-U&#39;</span><span class="p">,</span> <span class="s">&#39;--roster-user&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;roster_user&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;Roster username.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;roster-user&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;roster_user&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-a&#39;</span><span class="p">,</span> <span class="s">&#39;--action&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;action&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Specify action run on Roster.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;action&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;action&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--success&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;success&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Integer 1 or 0 of action success.&#39;</span><span class="p">,</span>
                           <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;success&gt;&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;int&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;success&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-b&#39;</span><span class="p">,</span> <span class="s">&#39;--begin-time&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
                           <span class="n">dest</span><span class="o">=</span><span class="s">&#39;begin_time&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Beginning time stamp in format &#39;</span>
                                <span class="s">&#39;YYYY-MM-DDThh:mm:ss.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;begin-time&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-e&#39;</span><span class="p">,</span> <span class="s">&#39;--end-time&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;end_time&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Ending time stamp in format &#39;</span>
                                <span class="s">&#39;YYYY-MM-DDThh:mm:ss.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;end-time&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;begin_time&#39;</span><span class="p">,</span> <span class="s">&#39;end_time&#39;</span><span class="p">),</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
                     <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;dependent_args&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--no-header&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;no_header&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Do not display a header.&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">(</span><span class="s">&#39;no_header&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
</div>
<div class="viewcode-block" id="AuditLog.SetActionFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.AuditLog.SetActionFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetActionFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Method to set action variable since credential has no action class&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s">&#39;AuditLog&#39;</span>
</div></div>
<div class="viewcode-block" id="ReservedWord"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.ReservedWord">[docs]</a><span class="k">class</span> <span class="nc">ReservedWord</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line reserved word flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="ReservedWord.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.ReservedWord.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;-w&#39;</span><span class="p">,</span> <span class="s">&#39;--word&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;word&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;The reserved word.&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;word&gt;&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">SetAllFlagRule</span><span class="p">(</span><span class="s">&#39;word&#39;</span><span class="p">,</span> <span class="n">required</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">action</span><span class="o">!=</span><span class="s">&#39;List&#39;</span><span class="p">)</span>

</div></div>
<div class="viewcode-block" id="SetMaintenance"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.SetMaintenance">[docs]</a><span class="k">class</span> <span class="nc">SetMaintenance</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line set maintenenace flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="SetMaintenance.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.SetMaintenance.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--on&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;on&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Turn Roster maintenance mode on.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--off&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;off&#39;</span><span class="p">,</span>
                           <span class="n">help</span><span class="o">=</span><span class="s">&#39;Turn Roster maintenance mode off.&#39;</span><span class="p">,</span>
                           <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">AddFlagRule</span><span class="p">((</span><span class="s">&#39;on&#39;</span><span class="p">,</span> <span class="s">&#39;off&#39;</span><span class="p">),</span> <span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">command</span><span class="o">=</span><span class="s">&#39;set&#39;</span><span class="p">,</span>
                     <span class="n">flag_type</span><span class="o">=</span><span class="s">&#39;independent_args&#39;</span><span class="p">)</span>
</div>
<div class="viewcode-block" id="SetMaintenance.SetActionFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.SetMaintenance.SetActionFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetActionFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Method to set action variable since set maintenance has no action</span>
<span class="sd">    class</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s">&#39;SetMaintenance&#39;</span>

</div></div>
<div class="viewcode-block" id="Bootstrap"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Bootstrap">[docs]</a><span class="k">class</span> <span class="nc">Bootstrap</span><span class="p">(</span><span class="n">core_flags</span><span class="o">.</span><span class="n">CoreFlags</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Command line bootstrap flags&quot;&quot;&quot;</span>
<div class="viewcode-block" id="Bootstrap.SetDataFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Bootstrap.SetDataFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetDataFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sets flags for self.parser&quot;&quot;&quot;</span>
    <span class="k">pass</span></div>
<div class="viewcode-block" id="Bootstrap.SetActionFlags"><a class="viewcode-back" href="../../roster_user_tools.html#roster_user_tools.data_flags.Bootstrap.SetActionFlags">[docs]</a>  <span class="k">def</span> <span class="nf">SetActionFlags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Method to set action variable since set maintenance has no action</span>
<span class="sd">    class</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s">&#39;Bootstrap&#39;</span></div></div>
</pre></div>

          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../../index.html">Roster User Tools v0.17 documentation</a> &raquo;</li>
          <li><a href="../index.html" >Module code</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Purdue University.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>